/* Apple风格核心变量 */
:root {
  --system-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell;
  --primary-color: #007AFF;
  --glass-bg: rgba(255,255,255,0.75);
  --card-shadow: 0 8px 32px rgba(0,0,0,0.04);
}

/* 毛玻璃效果 */
.glassmorphism {
  background: var(--glass-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

/* 导航栏动效 */
.navbar {
  font-family: var(--system-font);
  transition: background-color 0.5s cubic-bezier(0.28,0.62,0.35,1);
}

.navbar.scrolled {
  background: rgba(255,255,255,0.8);
  backdrop-filter: saturate(180%) blur(20px);
}

/* 卡片交互动画 */
.card {
  transform-origin: center;
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--card-shadow);
}

.card:hover {
  transform: translateY(-6px) scale(1.02);
}

/* 按钮微交互 */
.btn-primary {
  background: linear-gradient(135deg, #007AFF 0%, #0040FF 100%);
  border-radius: 20px;
  padding: 12px 32px;
  transition: opacity 0.3s, transform 0.3s;
}

.btn-primary:active {
  transform: scale(0.96);
}

/* 加载动画 */
@keyframes appleLoading {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner {
  animation: appleLoading 1s linear infinite;
}

/* Apple风格核心动画 */
.apple-card {
  transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  backface-visibility: hidden;
}

.apple-card:hover {
  transform: scale(1.02) perspective(1000px);
}

/* 触控反馈动画 */
[data-interactive]:active {
  opacity: 0.86;
  transition-duration: 0.1s;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }
}